Sign extension fix in EasyGPS
authorRobert Lipe <robertlipe@gpsbabel.org>
Thu, 20 Dec 2018 04:20:24 +0000 (22:20 -0600)
committerRobert Lipe <robertlipe@gpsbabel.org>
Thu, 20 Dec 2018 04:20:24 +0000 (22:20 -0600)
easygps.cc

index e6d9a6c99736ba9b05e87ad428205069d3ff92e6..38925f9bf522f014cbd692a84b6cbab842e61585 100644 (file)
@@ -76,13 +76,13 @@ wr_deinit()
 static void
 data_read()
 {
-  char p;
+  int p;
   char ibuf[10];
   do {
     Waypoint* wpt_tmp = new Waypoint;
     UrlLink link;
 
-    for (unsigned char tag = gbfgetc(file_in); tag != 0xff; tag = gbfgetc(file_in)) {
+    for (int tag = gbfgetc(file_in); tag != 0xff; tag = gbfgetc(file_in)) {
       switch (tag) {
       case 1:
         wpt_tmp->shortname = gbfgetpstr(file_in);